const customConfig = require("app-config");
const env: any = process.env;

let appConfig = {
  name: "拓扑贷后管理系统",
  version: "V4.5.0",
  url: {
    // server:'/api',
    server: env.VUE_APP_SERVER,
    attach: env.VUE_APP_ATTACH
  },
  callCenter: {
    socket: env.VUE_APP_CALLCENTER_SOCKET,
    entPhoneNo: env.VUE_APP_CALLCENTER_ENTPHONENO,
    skilld: env.VUE_APP_CALLCENTER_SKILLD
  },
  rabbitmq: {
    socket: env.VUE_APP_RABBITMQ_SOCKET,
    vhost: env.VUE_APP_RABBITMQ_VHOST,
    username: env.VUE_APP_RABBITMQ_USERNAME,
    password: env.VUE_APP_RABBITMQ_PASSWORD,
    exchange: env.VUE_APP_RABBITMQ_EXCHANGE
  },
  isSingleService: env.VUE_APP_SINGLR_SERVICE,
  timeout: 30000,
  debug: false, // env.ENV === 'dev',
  // 身份证号和手机号脱敏开关
  encryptSwitch: true
};

// 如果存在自定义配置则启用自定义配置
if (customConfig && customConfig.enable) {
  appConfig = { ...appConfig, ...customConfig.config };
}

export default appConfig;
